package cn.edu.sjtu.se.dslab.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.sjtu.se.dslab.dao.IPositionDao;
import cn.edu.sjtu.se.dslab.project.Position;
import cn.edu.sjtu.se.dslab.service.IPositionService;

@Service("positionService")
@Transactional
public class PositionServiceImpl implements IPositionService {

	@Resource(name="positionDao")
	IPositionDao positionDao;
	
	@Override
	public boolean addPosition(Position position) {
		positionDao.save(position);
		return true;
	}

	@Override
	public Position updatePosition(Position position) {
		return positionDao.update(position);
	}

	@Override
	public Position getPositionById(long id) {
		return positionDao.queryById(id);
	}

	@Override
	public List<Position> getPositionList() {
		return positionDao.queryByList();
	}

	@Override
	public boolean deletePosition(long id) {
		return false;
	}
	
	

}
